import path from 'path'

const resolve = (pagePath)=> path.resolve(process.cwd(),`./${pagePath}`)
export const  $routes = [
    {
        path: "/PersonalCenter",
        name:"PersonalCenter",
        component: resolve("pages/user/PersonalCenter.vue"),
        meta:{
            title: "个人中心",
            icon:"icon-PersonalCenter"
        },
        children:[
            {
                path: "/PersonalCenter",
                name: "PersonData",
                component: resolve("pages/user/child/PersonData.vue")
            },
            {
                path: "/PersonalCenter",
                name: "PersonComment",
                component: resolve("pages/user/child/PersonComment.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyResponse",
                component: resolve("pages/user/child/MyResponse.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyLike",
                component: resolve("pages/user/child/MyLike.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyResponse",
                component: resolve("pages/user/child/MyResponse.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyCollect",
                component: resolve("pages/user/child/MyCollect.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyBlog",
                component: resolve("pages/user/child/MyBlog.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyAttention",
                component: resolve("pages/user/child/MyAttention.vue")
            },
            {
                path: "/PersonalCenter",
                name: "MyFans",
                component: resolve("pages/user/child/MyFans.vue")
            },
        ]
    }
]
const  extendRoutes = (routes)=>{
     routes.push(...$routes);
}
export default {base:'/',extendRoutes}